function showOthers(url){
	var html = "<img src="+url+">";

	var widths = $(imgIndex).css("width");
	var heights = $(imgIndex).css("height");
	$.post(
			"showOtherProducts",
			{"autoUrl":url,"widthStr":widths,"heightStr":heights},
				function(data){
				var otherdiv="<h2 style=margin-left:-87%;>其他产品：</h2><ul style=list-style-type:none;>";
					$.each(data.products,function(index,value){
					var id = value.id;
					var url = value.url;
					var name = value.name;
					var price = value.price;
					var desc = value.desc;
					var pii = value.pi;
					var newUrl = value.newUrl;
					var html = "<li style=float:left;width:330px; onclick=change('"
							+pii.picUrl+"','"+url+"','"+pii.width+"','"+pii.height+"','"+pii.top+"','"+pii.left+"',"+id+")><div><table><tr><td><a href=javascript:void()>" +
							"    <img src=/"+newUrl+
					     " width=300px;></a></td><tr><td><a href=javascript:void() onclick=change('"
							+pii.picUrl+"','"+url+"','"+pii.width+"','"+pii.height+"','"+pii.top+"','"+pii.left+"',"+id+")>"+name+"</a></td></tr></table></div></li>";
					if(index<4){
				    otherdiv = otherdiv+html+"";
				    }

				});

				    otherdiv = otherdiv+"</ul>";
					$("#otherProducts").html(otherdiv);
			});
}
function change(picUrl,url,width,height,top,left,id){
	location.href="/showProduct?productId="+id+"&&bgPic="+url+"&&width="+width+"&&height="+height+"&&top1="+top+"&&left="+left+"&&picUrl="+picUrl;
}
//图片切换

function DY_scroll(wraper,prev,next,img,speed,or)
{ 
 var wraper = $(wraper);
 var prev = $(prev);
 var next = $(next);
 var img = $(img).find('ul');
 var w = img.find('li').outerWidth(true);
 var s = speed;
 next.click(function()
      {
       img.animate({'margin-left':-w},function()
                 {
                  img.find('li').eq(0).appendTo(img);
                  img.css({'margin-left':0});
                  });
       });
 prev.click(function()
      {
       img.find('li:last').prependTo(img);
       img.css({'margin-left':-w});
       img.animate({'margin-left':0});
       });
 if (or == true)
 {
  ad = setInterval(function() { next.click();},s*1000);
  wraper.hover(function(){clearInterval(ad);},function(){ad = setInterval(function() { next.click();},s*1000);});

 }
}
//--------------------------------------------------
